#ifndef STATEGY_H
#define STATEGY_H

#include <iostream>
#include "javabean.h"

using namespace std;

class Strategy{
public:
    virtual void symEncrypt()=0;
};


class Des:public Strategy{
public:
    virtual void symEncrypt(){
        cout<<"Des 加密"<<endl;
    }
};

class AES:public Strategy{
public:
    virtual void symEncrypt() {
        cout<<"Aes 加密"<<endl;
    }
};

class Context{
PointerPropertyBuilderByName(Strategy,starategy,private)
public:
    Context(Strategy *strategy){
        this->m_starategy=strategy;
    }
    void Operator(){
        this->m_starategy->symEncrypt();
    }
};

//int main(int argc, char *argv[])
//{
//    Strategy* stra= new AES;
//    Context *ctx = new Context(stra);
//    ctx->Operator();
//    return 0;
//}


#endif // STATEGY_H
